package vip.xiaonuo.facedoor.modular.devicebase.util;

import vip.xiaonuo.facedoor.modular.devicebase.entity.DeviceBase;

import java.util.HashMap;
import java.util.Map;

public class DeviceUrlUtil {

    /**
     * 设置设备信息下发地址
     */
    public static Map<String, String> setUrl(DeviceBase db) {
        Map<String, String> map = new HashMap<String, String>();
        map.put("addPersonUrl", "http://" + db.getCabinetIp() + ":" + db.getCabinetPort() + "/add_personnel");
        map.put("updatePersonUrl", "http://" + db.getCabinetIp() + ":" + db.getCabinetPort() + "/update_personnel");
        map.put("queryPersonUrl", "http://" + db.getCabinetIp() + ":" + db.getCabinetPort() + "/query_personnels");
        map.put("delPersonsUrl", "http://" + db.getCabinetIp() + ":" + db.getCabinetPort() + "/delete_personnel");
        map.put("rebootDevice", "http://" + db.getCabinetIp() + ":" + db.getCabinetPort() + "/reboot_device");
        return map;
    }

}
